const Mock = require("mockjs");
const getStatList = require("./data/getStatList");
const Random = Mock.Random;

module.exports = [
  //答卷列表
  {
    url: "/api/stat/:questionId",
    method: "get",
    response() {
      return {
        errno: 0,
        data: {
          total: 1000,
          list: getStatList(),
        },
      };
    },
  },
  {
    url: "/api/stat/chart/:questionId/:componentId",
    method: "get",
    response() {
      return {
        errno: 0,
        data: {
          stat: [
            { name: "男", count: 100 },
            { name: "女", count: 200 },
            { name: "未知", count: 300 },
            { name: "其他", count: 400 },
          ],
        },
      };
    },
  },
];
